<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>jq</title>
	<script src="jquery.js"></script>
	
</head>
<style>
	
</style>


<body>
	
		<h1 name='user123'>aaaaaaaaaaaa</h1>
		<h1 name='linux1234'>aaaaaaaaaaaa</h1>
		<h1 name='php123' age='20'>aaaaaaaaaaaa</h1>
		<h1 name='js'>aaaaaaaaaaaaaaaa</h1>
	
</body>
<script>
	
	//$('h1[name]').css({'color':'#f00'}); 
	//$('h1[name=user123]').css({'color':'#f00'}); 
	//$('h1[name^=linux]').css({'color':'#f00'}); //以linux开头
	//$('h1[name$=123]').css({'color':'#f00'}); //以123结尾
	//$('h1[name][age]').css({'color':'#f00'}); 
	//$('h1[name!=user123]').css({'color':'#f00'}); 
	$("h1[name*='12']").css({'color':'#f00'});//包含12的值
</script>
</html>